<div layout="row" layout-fill class="feed-property">
  <div flex="25" class="md-list-item-text">
    <md-input-container class="md-block" flex-gt-sm>
      <md-button md-no-ink class="md-primary kylo-edit-field-button" ng-click="vm.showEditFieldDialog(policy.columnDef)">{{policy.name | characters:20}}</md-button>
      <div class="hint">{{vm.fieldNameMap[policy.name].derivedDataType}}</div>
      <md-tooltip md-direction="left" ng-if="policy.columnDef.description">
        {{policy.columnDef.description}}
      </md-tooltip>
    </md-input-container>

  </div>
  <div flex="10" class="md-list-item-text">
    <md-select ng-model="policy.domainTypeId" md-selected-html="vm.getDomainTypePlaceholder(policy.domainTypeId)" ng-change="vm.onDomainTypeChange(policy)" style="margin:0;width:70px">
      <md-option ng-value=""><em>None</em></md-option>
      <md-option ng-repeat="domainType in vm.availableDomainTypes | orderBy:'title' track by $index" ng-value="domainType.id" aria-label="{{domainType.title}}">
        <ng-md-icon icon="{{domainType.icon}}" ng-style="{'fill':domainType.iconColor}"></ng-md-icon> {{domainType.title}}
      </md-option>
    </md-select>
    <md-button md-no-ink class="kylo-apply-domain-type-button" ng-if="policy.domainTypeId != null" ng-click="vm.onDomainTypeChange(policy)">Reapply</md-button>
  </div>
  <div flex="40" class="md-list-item-text layout-margin-top-7" layout-align="space-between start" layout="row">
    <div class="data-policy-item-check-box" layout="row" layout-align="center center">
      <md-checkbox layout="column" layout-align="center center"
          ng-model="policy.columnDef.primaryKey" aria-label="Primary Key" ng-change="vm.onChangePrimaryKey()">
      </md-checkbox>
    </div>
    <div class="data-policy-item-check-box" layout="row" layout-align="center center">
      <md-checkbox layout="column" layout-align="center center"
          ng-model="policy.columnDef.createdTracker" aria-label="Created Tracker"
          ng-disabled="!(policy.columnDef.derivedDataType == 'date' || policy.columnDef.derivedDataType == 'timestamp')"></md-checkbox>
    </div>
    <div class="data-policy-item-check-box" layout="row" layout-align="center center">
      <md-checkbox layout="column" layout-align="center center"
          ng-model="policy.columnDef.updatedTracker" aria-label="Created Tracker"
          ng-disabled="!(policy.columnDef.derivedDataType == 'date' || policy.columnDef.derivedDataType == 'timestamp')"></md-checkbox>
    </div>
    <div class="data-policy-item-check-box" layout="row" layout-align="center center">
      <md-checkbox layout="column" layout-align="center center"
                   ng-disabled = "vm.shouldIndexingOptionsBeDisabled()"
                   ng-model="policy.index" aria-label="Index" ng-click="vm.indexCheckAll.clicked(!policy.index)"></md-checkbox>
    </div>
    <div class="data-policy-item-check-box" layout="row" layout-align="center center">
      <md-checkbox layout="column" layout-align="center center"
          ng-model="policy.profile" aria-label="Profile" ng-click="vm.profileCheckAll.clicked(!policy.index)"></md-checkbox>
    </div>
  </div>
  <div
      class="md-list-item-text hint layout-margin-left-10"
      flex="25"
      layout="row"
      layout-align="start center">
    <div ng-click="vm.showFieldRuleDialog(policy)" style="color:#2D78B1; white-space: nowrap">
      <md-button class="icon-btn" style="padding-left:2px;padding-right:2px;">
        <ng-md-icon icon="add_circle_outline" style="fill:#2D78B1;"></ng-md-icon>
      </md-button>
      ADD
    </div>

    <div ng-if="(policy.standardization != null && policy.standardization.length >0 || policy.validation != null && policy.validation.length >0)" class="orange"
         style="padding-left:15px; white-space: nowrap" layout="column">
      <span ng-if="policy.standardization != null && policy.standardization.length >0">{{policy.standardization.length}} Standardizers</span>
      <span ng-if="policy.validation != null && policy.validation.length >0">{{policy.validation.length}} Validators</span>
    </div>
  </div>
</div>
